import createDB
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app


#Fill the server DB with entities
class fillDB(webapp.RequestHandler):
    def get(self):
        
        """     Sphinx = createDB.Place(
                name="The Sphinx",
                Lat=29.975309,
                Lon=31.137751,
                urls=["http://media.hummba.s3.amazonaws.com/au.25402.mp3.E7x4-w9djFKbdy6.mp3" ]);
                
        Sphinx.put();

        Khafre = createDB.Place(
                name="Pyramid of Khafre",
                Lat=29.975927,
                Lon=31.131236,
                urls=[ "http://media.hummba.s3.amazonaws.com/au.25396.mp3.crEvJNjdNX1yXKB.mp3" ]);
                
        Khafre.put();

        GreatPyramid = createDB.Place(
                name="The Great Pyramid",
                Lat=29.979175,
                Lon=31.134358,
                urls=[ "http://media.hummba.s3.amazonaws.com/au.25418.mp3.BdxZf1aFgYatixY.mp3" ]);
        GreatPyramid.put();



        Menkaure = createDB.Place(
               name= "Pyramid of Menkaure",
               Lat= 29.972495,
               Lon= 31.128465,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25419.mp3.LKrG%2B9qf-GJt%2BJM.mp3" ]);
        Menkaure.put();

        GizaPlateau = createDB.Place(
                name="Giza Plateau",
               Lat= 29.976111,
               Lon= 31.132778,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25424.mp3.PgZrKG21In5lhoW.mp3" ]);
        GizaPlateau.put();
   
        Memphis = createDB.Place(
               name= "Memphis",
               Lat= 29.850161,
               Lon= 31.221937,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25426.mp3.L-qUMWdUjLwurCV.mp3" ]);
        Memphis.put();
        

        Serapeum = createDB.Place(
               name= "Serapeum",
               Lat= 29.87497,
               Lon= 31.21218,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25432.mp3.0NUDRtIj0jKrark.mp3" ]);
        Serapeum.put();
        
        EvangelicalChurch = createDB.Place(
               name= "German Evangelical Church",
               Lat= 30.033461,
               Lon= 31.209736,
               urls=[ "http://media.hummba.s3.amazonaws.com/au.25467.mp3.nLwYN6qUkkGd4xH.mp3" ]);
        EvangelicalChurch.put();
        
        Mohamed = createDB.Place(
               name= "Mohamed, Mahmoud Khalil and His Wife Mus",
               Lat= 30.035556,
               Lon= 31.219722,
                urls=[ "http://media.hummba.s3.amazonaws.com/au.25483.mp3.quL3nIutm4nILV7.mp3" ]);
        Mohamed.put();
        
        Saqqara = createDB.Place(
               name= "Step Pyramid of Saqqara",
               Lat= 29.871267,
               Lon= 31.216394,
               urls=[ "http://media.hummba.s3.amazonaws.com/au.25486.mp3.LGs9JU6VsVLygYc.mp3" ]);
        Saqqara.put();
        
        Mastaba = createDB.Place(
               name= "Mastaba of Ankh Mahor",
                Lat=29.87593,
               Lon= 31.22165,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25489.mp3.M64xDakbgLf-Ky4.mp3" ]);
        Mastaba.put();
        
        Ragabs = createDB.Place(
              name=  "Dr Ragabs Pharaonic Village",
               Lat= 29.997157,
               Lon= 31.214778,
                urls=[ "http://media.hummba.s3.amazonaws.com/au.25483.mp3.quL3nIutm4nILV7.mp3" ]);
        Ragabs.put();
        
        Museum = createDB.Place(
               name= "Solar Boat Museum",
               Lat= 29.977911,
               Lon= 31.134554,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25518.mp3.0-076Jdara6qWxR.mp3" ]);
        Museum.put();
        
        Zoo = createDB.Place(
               name= "Cairo Zoo",
               Lat= 30.024533,
               Lon= 31.213897,
                urls=[ "http://media.hummba.s3.amazonaws.com/au.25522.mp3.KQ%2B2mkTqH%2BNJ6fq.mp3" ]);
        Zoo.put();
        
        Mereruk = createDB.Place(
               name= "Saqqara-Mastaba of Mereruka",
               Lat= 29.8759862342,
               Lon= 31.2209830705,
              urls=[ "http://media.hummba.s3.amazonaws.com/au.25521.mp3.7feCFiZYbZJkG4g.mp3" ]);
        Mereruk.put();
        
        RamsesII = createDB.Place(
               name= "Colossus of Ramses II",
               Lat= 30.062636,
               Lon= 31.247101,
                urls=[  "http://media.hummba.s3.amazonaws.com/au.25472.mp3.u2rHuir4dk3SQ6E.mp3" ]);
        RamsesII.put();
        
        Imbaba = createDB.Place(
              name=  "Imbaba",
               Lat= 30.081274,
               Lon= 31.199274,
                urls=[ 
                        "http://media.hummba.s3.amazonaws.com/au.25728.mp3.Ljxb5rsNl3fbijC.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25729.mp3.SOVdDGg5tvro979.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25730.mp3.Wo%2B4a-3rprL4yuN.mp3" ]);
        Imbaba.put();
        
        Agouza = createDB.Place(
              name=  "Agouza",
              Lat=  30.05414,
              Lon=  31.211432,
               urls=[ 
                        "http://media.hummba.s3.amazonaws.com/au.25733.mp3.lqxzJxcrjLNvE4G.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25734.mp3.pH082xX0GAZHYA8.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25735.mp3.vUlPyl0ViY5Q80t.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25736.mp3.SNT4yHxM3ttESO0.mp3" ]);
        Agouza.put();
        
        Mohandiseen = createDB.Place(
              name=  "Mohandiseen",
               Lat= 30.058231,
               Lon= 31.19734,
               urls=[ 
                        "http://media.hummba.s3.amazonaws.com/au.25737.mp3.znSDyNNMIdfhuiT.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25738.mp3.6%2BnnfasbhMEtXXa.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25740.mp3.xETGw1XGfeTPL8q.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25741.mp3.B5xS736b7ezzr6U.mp3" ]);
        Mohandiseen.put();
        
        Dokki = createDB.Place(
              name=  "Dokki",
              Lat=  30.058231,
               Lon= 31.19734,
                urls=[ 
                        "http://media.hummba.s3.amazonaws.com/au.25742.mp3.F2gmgFptNei%2B5UR.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25743.mp3.ExEC1PpAuzMM9BI.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25744.mp3.BVBUN3HWXv4tjuk.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25745.mp3.Edyl9r54iwJMfTV.mp3" ]);
        Dokki.put();
        
        Giza = createDB.Place(
              name=  "Giza",
              Lat=  30.043623,
              Lon=  31.205912,
               urls=[ 
                        "http://media.hummba.s3.amazonaws.com/au.25747.mp3.hjVDBrqLYEHwzAl.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25748.mp3.BI%2BQaGbCMNrpp52.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25749.mp3.fVYAMc0qFJgid8k.mp3",
                        "http://media.hummba.s3.amazonaws.com/au.25750.mp3.X-Wr43aF5LFRRSz.mp3" ]);
        Giza.put();
        

        
        Comment1 = createDB.Comments(placeName="The Great Pyramid", comment="The Pyramid is awesome");
        Comment1.put();
        
        Comment2 = createDB.Comments(placeName="Dokki", comment="Ta little bit crowded");
        Comment2.put();
        
        Comment3 = createDB.Comments(placeName="Imbaba", comment="Very Nice");
        Comment3.put();
        """
        Borg= createDB.Place(
              name=  "Cairo Tower",
              Lat=  30.045833,
              Lon=  31.224444,
              urls=["http://www.readthewords.com/work/output/114764_text64147AM.txt.mp3"]
               );
        Borg.put();
        
        citadel= createDB.Place(
              name=  "Cairo Citadel",
              Lat=  30.029444,
              Lon=  31.261389,
               );
        citadel.put();
        
        opera= createDB.Place(
              name=  "Cairo Opera House",
              Lat=  30.04245,
              Lon=  31.22353,
               );
        opera.put();
        
        tahrir= createDB.Place(
              name=  "Tahrir Square",
              Lat=  30.044422,
              Lon=  31.235696,
               );
        tahrir.put();
        
        mus= createDB.Place(
              name=  "Egyptian Museum",
              Lat=  30.047778,
              Lon=  31.233333,
               );
        mus.put();
        
        mus= createDB.Place(
              name=  "Khan el-Khalili",
              Lat=  30.0475,
              Lon=  31.262222,
               );
        mus.put();
        
        
                
application = webapp.WSGIApplication([('/fillDB', fillDB)], debug=True)
  
def main():
    run_wsgi_app(application)
    
if __name__ == "__main__":
        main()
    


        
